Minimal Mergesort
نویسنده
چکیده
We present a new adaptive sorting algorithm, called minimal merge sort, which merges the ascending runs in the input list from shorter to longer, that is, merging the shortest two lists each time. We show that this algorithm is optimal with respect to the new measure of presortedness, called entropy.
منابع مشابه
Improving Mergesort for Linked Lists
We present a highly tuned mergesort algorithm that improves the cost bounds when used to sort linked lists of elements. We provide empirical comparisons of our algorithm with other mergesort algorithms. The paper also illustrates the sort of techniques that allow to speed a divide-and-conquer algorithm.
متن کاملBranch Mispredictions Don't Affect Mergesort
In quicksort, due to branch mispredictions, a skewed pivotselection strategy can lead to a better performance than the exactmedian pivot-selection strategy, even if the exact median is given for free. In this paper we investigate the effect of branch mispredictions on the behaviour of mergesort. By decoupling element comparisons from branches, we can avoid most negative effects caused by branch...
متن کاملMellin Transforms and Asymptotics The Mergesort Recurrence
Mellin transforms and Dirichlet series are useful in quantifying periodicity phe nomena present in recursive divide and conquer algorithms This note illustrates the tech niques by providing a precise analysis of the standard top down recursive mergesort algo rithm in the average case as well as in the worst and best cases It also derives the variance and shows that the cost of mergesort has a G...
متن کاملSIMD- and Cache-Friendly Algorithm for Sorting an Array of Structures
This paper describes our new algorithm for sorting an array of structures by efficiently exploiting the SIMD instructions and cache memory of today’s processors. Recently, multiway mergesort implemented with SIMD instructions has been used as a high-performance in-memory sorting algorithm for sorting integer values. For sorting an array of structures with SIMD instructions, a frequently used ap...
متن کامل‘Runsort’—An Adaptive Mergesort for Prolog
This note describes a novel list-sorting method for Prolog which is stable, has O(n logn) worst-case behaviour and O(n) best-case behaviour. The algorithm is an adaptive variant of bottom-up mergesort using so-called long runs of preexisting order to improve efficiency; accordingly we have called it ‘runsort’. Runsort compares favourably with samsort, and a modification to samsort is suggested.
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1996